package com.example.sqlitelogin;

import android.content.Intent;
import android.os.Bundle;

import androidx.fragment.app.Fragment;

import android.util.Log;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.LinearLayout;
import android.widget.TextView;


/**
 * A simple {@link Fragment} subclass.
 * Use the {@link BlankFragment1#newInstance} factory method to
 * create an instance of this fragment.
 */
public class BlankFragment2 extends Fragment {


    private static final String ARG_TEXT = "param1";

    // TODO: Rename and change types of parameters
    private String mTextString;


    View rootView;

    public BlankFragment2() {
        // Required empty public constructor
    }

    /**
     * Use this factory method to create a new instance of
     * this fragment using the provided parameters.
     *
     * @param param1 Parameter 1.

     * @return A new instance of fragment BlankFragment1.
     */
    // TODO: Rename and change types and number of parameters
    public static BlankFragment2 newInstance(String param1) {
        BlankFragment2 fragment = new BlankFragment2();
        Bundle args = new Bundle();
        args.putString(ARG_TEXT, param1);

        fragment.setArguments(args);
        return fragment;
    }

    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        if (getArguments() != null) {
            mTextString = getArguments().getString(ARG_TEXT);

        }
    }

    @Override
    public View onCreateView(LayoutInflater inflater, ViewGroup container,
                             Bundle savedInstanceState) {
        if(rootView==null){
            rootView= inflater.inflate(R.layout.fragment_blank2, container, false);
        }
        initView();
        return rootView;
    }

    private void initView() {
        LinearLayout linear1,linear2,linear3,linear4,linear5,linear6,linear7,linear8;

        linear1=rootView.findViewById(R.id.lin1);
        linear1.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                Intent intent6=new Intent(getActivity(),LL1Activity.class);
                startActivity(intent6);
            }
        });

        linear2=rootView.findViewById(R.id.lin2);
        linear2.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                Intent intent6=new Intent(getActivity(),LL2Activity.class);
                startActivity(intent6);
            }
        });
        linear3=rootView.findViewById(R.id.lin3);
        linear3.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                Intent intent6=new Intent(getActivity(),LL3Activity.class);
                startActivity(intent6);
            }
        });

        linear4=rootView.findViewById(R.id.lin4);
        linear4.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                Intent intent6=new Intent(getActivity(),LL4Activity.class);
                startActivity(intent6);
            }
        });
        linear5=rootView.findViewById(R.id.lin5);
        linear5.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                Intent intent6=new Intent(getActivity(),LL5Activity.class);
                startActivity(intent6);
            }
        });
//        linear6=rootView.findViewById(R.id.lin6);
//        linear6.setOnClickListener(new View.OnClickListener() {
//            @Override
//            public void onClick(View v) {
//                Intent intent6=new Intent(getActivity(),LL6Activity.class);
//                startActivity(intent6);
//            }
//        });
//        linear7=rootView.findViewById(R.id.lin7);
//        linear7.setOnClickListener(new View.OnClickListener() {
//            @Override
//            public void onClick(View v) {
//                Intent intent6=new Intent(getActivity(),LL7Activity.class);
//                startActivity(intent6);
//            }
//        });
//        linear8=rootView.findViewById(R.id.lin8);
//        linear8.setOnClickListener(new View.OnClickListener() {
//            @Override
//            public void onClick(View v) {
//                Intent intent6=new Intent(getActivity(),LL8Activity.class);
//                startActivity(intent6);
//            }
//        });
    }
}